<template>
	<view>
		<view class="result">
			<img src="/static/dui.png" alt="" />
			<view class="succ">
				预约成功
			</view>
			<view class="number">
				预约编号：{{verificationCode}}
			</view>
		</view>
		<view class="btn">
			<view class="" @click="goindex()">
				返回首页
			</view>
			<view class="" @click="godetail()">
				预约详情
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				verificationCode:'',
				repairId:''
			}
		},
		methods: {
			goindex() {
				uni.reLaunch({
					url: "/pages/index/index"
				})
			},
			godetail(){
				uni.navigateTo({
					url:'/pages/index/maintainDetail/reservation/appointmentDetail/appointmentDetail?id='+this.repairId
				})
			},
			onLoad(event){
				const token = uni.getStorageSync('Token');
				this.repairId = event.id
				uni.request({
					url:'http://localhost/dev-api/merchant/reservation/'+event.id,
					header:{
						'Authorization': token
					},
					success:(resp)=> {
						console.log('11111',resp);
						this.verificationCode = resp.data.data.verificationCode
						console.log(this.verificationCode);
					}
				})
			}
		}
	}
</script>

<style>
	page {
		background-color: #fff;
	}

	.result {
		text-align: center;
		margin-top: 80px;
	}

	.result>img {
		width: 66px;
		height: 66px;

	}

	.succ {
		/* width: 80px; */
		font-size: 20px;
		height: 29px;
		line-height: 29px;
		text-align: center;
	}

	.number {
		height: 20px;
		line-height: 20px;
		margin-top: 19px;
	}

	.btn {
		margin-top: 51px;
	}

	.btn>view {
		height: 40px;
		line-height: 40px;
		border-radius: 5px;
		font-size: 18px;
		width: 242px;
		color: #fff;
		text-align: center;
		background-color: #1D6FFF;
		margin: auto;
		margin-top: 20px;
	}
</style>